package oi;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class OIS {
    public static void main(String[] args) {
        try(ObjectInputStream ois = new ObjectInputStream(
                new FileInputStream("oos.dat"));)
        {
            Person p =(Person) ois.readObject();
            System.out.println(p);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }



    }
}
